//
//  PairManager.h
//  Moonlight
//
//  Created by Diego Waxemberg on 10/19/14.
//  Copyright (c) 2014 Moonlight Stream. All rights reserved.
//

#import "HttpManager.h"

/**
 * 配对管理
 */
@protocol PairCallback <NSObject>

- (void)startPairing:(NSString*)PIN;
- (void)pairSuccessful:(NSData*)serverCert;
- (void)pairFailed:(NSString*)message;
- (void)alreadyPaired;

@end

@interface PairManager : NSOperation

/// 初始化匹配管理者
/// - Parameters:
///   - httpManager: httpManager description
///   - isSunshine: 是否是sunshine启动
///   - clientCert: clientCert description
///   - callback: callback description
- (id)initWithManager:(HttpManager*)httpManager isSunshine:(BOOL)isSunshine clientCert:(NSData*)clientCert callback:(id<PairCallback>)callback;
@end
